package com.yonyou.pmclouds.signin.mapper;

import com.yonyou.pmclouds.basecom.dao.BaseMapper;
import com.yonyou.pmclouds.statistic.entity.SignInQueryRecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface SignInStatisticMapper extends BaseMapper<SignInQueryRecordVO> {

    List<SignInQueryRecordVO> queryAllRecordsOfProjects(@Param("tenantId") String tenantId, @Param("projectIds") String[] projectIds,
                                                        @Param("timeStart") Date timeStart, @Param("timeEnd") Date timeEnd);

    List<SignInQueryRecordVO> queryUserSignInOfProject(@Param("tenantId") String tenantId, @Param("userId") String userId,
                                                       @Param("projectId") String projectId, @Param("timeStart") Date timeStart, @Param("timeEnd") Date timeEnd);

    List<SignInQueryRecordVO> queryUserSignInOfEnt(@Param("tenantId") String tenantId, @Param("userId") String userId,
                                                   @Param("enterpriseId") String enterpriseId, @Param("projectIds") String[] projectIds,
                                                   @Param("timeStart") Date timeStart, @Param("timeEnd") Date timeEnd);

}
